package com.safety51.bi.service;

import com.safety51.bi.mapper.ChartConfigMapper;
import com.safety51.bi.entity.ChartConfig;
import com.safety51.bi.entity.ChartConfig;
import com.safety51.bi.mapper.ChartConfigMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChartConfigService {
    
    private final ChartConfigMapper chartConfigMapper;
    
    public ChartConfigService(ChartConfigMapper chartConfigMapper) {
        this.chartConfigMapper = chartConfigMapper;
    }
    
    public ChartConfig getConfigByChartId(String chartId) {
        return chartConfigMapper.findByChartId(chartId);
    }
    
    public List<ChartConfig> getAllActiveConfigs() {
        return chartConfigMapper.findAllActive();
    }
}